Motion.CreateSpline method
Creates a spline curve.
Namespace: IntervalZero.KINGSTAR.Local.Api
Assembly: IntervalZero.KINGSTAR.Local.Api (in IntervalZero.KINGSTAR.Local.dll) Version: 4.4.0.0
Syntax
public KsCommandStatus CreateSpline(
int Index,
McSplineMode Mode,
int SplineId,
int Dimension,
McSplineData[] SplineData,
double[] CurveParam
)
Public Function CreateSpline(
Index As Integer,
Mode As McSplineMode,
SplineId As Integer,
Dimension As Integer,
SplineData As McSplineData(),
CurveParam As Double()
) As KsCommandStatus
Parameters
Index
Type: int
The index of an axis group. Indexes are zero based. You can have up to 32 groups.
Mode
Type: McSplineMode
The curve fitting method for generating a spline curve.
SplineId
Type: int
The index of the path trajectory to be created.
Dimension
Type: int
The length for the Point
array in the McSplineData Class.
SplineData
Type: McSplineData[]
The array that stores data for generating spline curve.
CurveParam
Type: double[]
The array that stores the parameters for a corresponding mode.
Return value
Type: KsCommandStatus
Returns the KsCommandStatus class.
Remarks
- CreateSpline must be called before MoveSpline.
- The maximum number of control points for cubic B-splines is 64.
- The curve generated using CreateSpline cannot be modified while MoveSpline is running.
- The maximum number of splines for each group is 2, so the SplineId's valid range is from 0 to 1.
- Each group is able to call one CreateSpline at a time. If a CreateSpline has not
Done
yet, calling a new CreateSpline will get an error. - For the clamped and uniform knot vector in the B-splines mode, four points controls a curve segment. Moving a control point can change the shape of a segment. The segment's motion is defined by the first point's motion profile in that segment. Each point's motion profile is defined in McSplineData.
Example:
Green trace: B-spline curve.
Orange trace: control polygon (the lines between the control points).
P1, P2, P3.....: knots, which are control points of the curve. Move these points can change the shape of the curve segment they control.
First curve segment is controlled by P1, P2, P3, and P4. Second curve segment is controlled by P2, P3, P4, and P5, and so on.
First segment's motion: defined by P1's motion profile.
Second segment's motion: defined by P2's motion profile.
P1's motion profile: determined by P1's SplineData, in which Velocity, Acceleration, Deceleration, and Jerk affects the profile.
P2's motion profile: determined by P2's SplineData, in which Velocity, Acceleration, Deceleration, and Jerk affects the profile.
- Spline motion doesn't have the following features:
- Blending with other group motion commands
- Delta and SCARA kinematic configurations
- Updating command on the fly with UpdateCommand
- Path cam switch
Examples
N/A
See also